package net.lainiao.morethread.Chapter1.demo8;

/**
 * Created by Administrator on 2017/2/28.
 */
public class MyThreadGroup extends ThreadGroup {
    public MyThreadGroup(String name) {
        super(name);
    }

    @Override
    public void uncaughtException(Thread t, Throwable e) {
        System.out.println("Thread has throw an Exception:"+t.getId());
        e.printStackTrace();
        System.out.println("Termination the rest of the Threads");
        interrupt();
    }

}
